using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace Eamon.MeituanDotnetSDK.model.ddzh.ugc.ugcQueryShopReview
{
    /// <summary>
    /// 评论信息
    /// </summary>
    public class ReviewInfoDTO
    {
        /// <summary>
        /// 评价ID
        /// </summary>
        [JsonPropertyName("reviewId")]
        public string ReviewId { get; set; }

        /// <summary>
        /// 评价星级
        /// </summary>
        [JsonPropertyName("star")]
        public int? Star { get; set; }

        /// <summary>
        /// 精确星级
        /// </summary>
        [JsonPropertyName("accurateStar")]
        public int? AccurateStar { get; set; }

        /// <summary>
        /// 评价时间
        /// </summary>
        [JsonPropertyName("reviewTime")]
        public string ReviewTime { get; set; }

        /// <summary>
        /// 如果是消费评价，则存在订单编号
        /// </summary>
        [JsonPropertyName("consumeOrderId")]
        public string ConsumeOrderId { get; set; }

        /// <summary>
        /// 如果是消费评价，则存在消费金额
        /// </summary>
        [JsonPropertyName("consumeAmount")]
        public string ConsumeAmount { get; set; }

        /// <summary>
        /// 如果是消费评价，则存在消费时间
        /// </summary>
        [JsonPropertyName("consumeTime")]
        public string ConsumeTime { get; set; }

        /// <summary>
        /// 如果是消费评价，则存在消费券号
        /// </summary>
        [JsonPropertyName("serialNumbers")]
        public string SerialNumbers { get; set; }

        /// <summary>
        /// 评论质量
        /// </summary>
        [JsonPropertyName("reviewQuality")]
        public int? ReviewQuality { get; set; }

        /// <summary>
        /// 详细评分
        /// </summary>
        [JsonPropertyName("scoreDetails")]
        public List<ScoreDetail> ScoreDetails { get; set; }

        /// <summary>
        /// 交易基础信息
        /// </summary>
        [JsonPropertyName("tradeDetails")]
        public List<TradeDetail> TradeDetails { get; set; }

        public override string ToString()
        {
            return $"ReviewInfoDTO{{ReviewId={ReviewId}, Star={Star}, AccurateStar={AccurateStar}, ReviewTime={ReviewTime}, ConsumeOrderId={ConsumeOrderId}, ConsumeAmount={ConsumeAmount}, ConsumeTime={ConsumeTime}, SerialNumbers={SerialNumbers}, ReviewQuality={ReviewQuality}, ScoreDetails={ScoreDetails}, TradeDetails={TradeDetails}}}";
        }
    }
}
